<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>金币录入管理</title>
	  <meta name="decorator" content="default"/>
	  <script type="text/javascript">
		$(document).ready(function() {
	
		
	});	
  function checkData(){
			document.forms[0].submit();
			$("#").attr("disabled",true);
	        
  }

    
	function del(){
		document.getElementById("div").style.display= "block"; 	
	}
	
		
	</script>
	
<style>
#uploadImg{ font-size:12px; overflow:hidden; position:absolute}
#file{ position:absolute; z-index:100; margin-left:-180px; font-size:60px;opacity:0;filter:alpha(opacity=0); margin-top:-5px;}
</style>
</head>
<body>
   <li>金币管理->主动发放金币</li>   
   <form method="POST"  enctype="multipart/form-data" id="form2" action="${ctx}/goldinput/goldcoin/excelExport">  
      <table id="contentTable" class="table">
         
         <tr>  
            <td>名称: </td>  
          <td>  
          <input name="goldcoinname"  value="${goldcoinWapper.goldcoinname }" htmlEscape="false" maxlength="80" class="input-medium"/>
          <input name="goldcoinid" style="display:none" value="${goldcoinWapper.goldcoinid}" htmlEscape="false" maxlength="80" class="input-medium"/>
          <input name="goldcoinactivity"  style="display:none" value="${goldcoinWapper.goldcoinactivity }" htmlEscape="false" maxlength="80" class="input-medium"/>   
           <input name="branchId"  style="display:none" value="${goldcoinWapper.branchid }" htmlEscape="false" maxlength="80" class="input-medium"/>      
          </td>
         </tr>   
         
          <tr>  
            <td width="40px"  >金币所属活动: </td>  
          <td>   <input  name="activityname"   value="${goldcoinWapper.activityname }" htmlEscape="false" maxlength="80" class="input-medium"/> </td>
         </tr>  

         
         <tr>  
            <td>请选择文件: </td>  
         
            <td> 

        <!--   <input id="upfile" type="file" name="upfile"   >   -->
           <input type="file" name="upfile" style="display:none" onchange="this.form.$upfile.value=this.value" />
           <input type="button" value="选择文件" onclick="this.form.upfile.click()" />
           <input type="text" name="$upfile" /> 
           <br/>
				<span style="color: red">点击下载模版文件：<a
						id="download" href="${ctx}/goldinput/goldcoin/download">主动发放金币模板.xlsx</a></span>
		</td>	
        <tr>  
           <td>   </td>
          <td><input type="submit" value="提交"  id="bu_uploadLoan" onclick="checkData()"></td>     
         </tr>  
          <tr> 
          <td>   </td>
          <td  width="300px">
             <p style="color: red">总共导入${totalNum}条，成功 ${successNum }条,失败${errorNum }条	
		      <c:if test="${totalNum !=null && errorNum!=null && successNum !=null && (totalNum > successNum)  }">
				    <a href="JavaScript:void(0)" onclick="del()" >查看失败信息</a>  			      
		   </c:if>
		 <%--    <c:if test="${totalNum ==0  && successNum ==0  }">
				    <a href="JavaScript:void(0)" onclick="del()" >查看失败信息</a>  			      
		   </c:if> --%>
		   </p>
           </td>
           
         </tr> 
        </table>    
    </form>  

<div  style="display:none"  id ="div">
<form  enctype="multipart/form-data" id="form1"    >  
      <table id="contentTable" class="table table-striped table-bordered table-condensed">
         
         <c:forEach items="${errorMsgList}" var="record" varStatus="i">
			<tr>
				 <c:if test="${record.userId !=null && record.errorMsg !=null }">   
					<p>userID ${record.userId}失败原因： ${record.errorMsg}</p>
		        </c:if>   
			
			</tr>
		</c:forEach>

         
     
        </table>    
    </form>  
</div>

</body>
</html>